package com.example.photoview;

import javafx.scene.effect.DropShadow;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;

/**
 * 设置imageView具体的样式
 */
public class ImageView2 extends ImageView {
    public ImageView2(Image image){
        super(image);
        setImageDepth();//阴影
        setPreserveRatio(true);
        setFitHeight(150);
        setFitWidth(150);
   }
   private void setImageDepth(){
       DropShadow ds=new DropShadow();
       ds.setWidth(100);
       ds.setHeight(100);
   }
}
